//
//  NRWSubScriptionLabelCell.m
//  NRWMall
//
//  Created by 张记 on 2018/6/4.
//  Copyright © 2018年 com.anpxd. All rights reserved.
//

#import "NRWSubScriptionLabelCell.h"

@interface NRWSubScriptionLabelCell ()
@property (weak, nonatomic) IBOutlet UILabel *mainLabel;
@property (weak, nonatomic) IBOutlet UIButton *closeBtn;

@end

@implementation NRWSubScriptionLabelCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.mainLabel.layer.masksToBounds = YES;
    self.mainLabel.backgroundColor = [mainColor() colorWithAlphaComponent:0.2];
    self.mainLabel.layer.cornerRadius = 5;
    self.mainLabel.textColor = mainColor();
}
-(void)setIndex:(NSIndexPath *)index{
    _index = index;
}

-(void)setLabelTitle:(NSString *)LabelTitle{
    _LabelTitle = LabelTitle;
    self.mainLabel.text = LabelTitle;
}
-(void)setIsShowClose:(BOOL)isShowClose{
    _isShowClose = isShowClose;
    if (isShowClose == YES) {
        self.closeBtn.hidden = YES;
    }else{
        self.closeBtn.hidden = NO;
    }
}
- (IBAction)closeThisFilterLable:(id)sender {
    
    [self routerEventWithName:@"Close" userInfo:@{@"index" : self.index}];

}

@end
